package com.example.serialize;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

/**
 * @author houyangfan
 * @version 1.0
 * @date 2022/7/29 19:25
 */
@Data
public class ApiResultWrong {

    private boolean succcess;

    private int code;

    public ApiResultWrong() {
    }

    @JsonCreator
    public ApiResultWrong(@JsonProperty("code") int code){
        this.code = code;
        if (code == 2000) succcess = true;
        else succcess = false;
    }
}
